home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex39.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  507 b   |  19 lines

  1. Program Example39;
  2.  
  3. { Program to demonstrate the Mark and Release functions. }
  4.  
  5. Var P,PP,PPP,MM : Pointer;
  6.  
  7. begin
  8.   Getmem (P,100);
  9.   Mark (MM);
  10.   Writeln ('Getmem 100   : Memory available : ',MemAvail,' (marked)');
  11.   GetMem (PP,1000);
  12.   Writeln ('Getmem 1000  : Memory available : ',MemAvail);
  13.   GetMem (PPP,100000);
  14.   Writeln ('Getmem 10000 : Memory available : ',MemAvail);
  15.   Release (MM);
  16.   Writeln ('Released     : Memory available : ',MemAvail);    
  17.   { At this point, PP and PPP are invalid ! }
  18. end.
  19.